/*
 * Copyright (c) 2011, Andrew Cole
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 *
 * Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 * THE POSSIBILITY OF SUCH DAMAGE.
 */

package net.andycole.xmiparser.transfer;

/**
 * Represents an Actionscript class attribute.
 * @author Andrew Cole
 */
public class TransferAttribute extends TransferParameter
{
   private boolean _isStatic;
   private boolean _isFinal;
   private boolean _isConst;
   private String  _accessLevel;
   private String  _metaType;

   public TransferAttribute(String name, String type)
   {
      this(name, type, "public", false, false, false);
   }
   public TransferAttribute(String name, String type,
                String accessLevel,
                boolean isConst,
                boolean isStatic,
                boolean isFinal)
   {
      super(name, type);
      _isStatic = isStatic;
      _isFinal = isFinal;
      _isConst = isConst;
      _accessLevel = accessLevel;
   }
   /**
    * Whether the attribute is public, private or protected.
    * @param level
    */
   public void setAccessLevel(String level)
   {
      _accessLevel = level;
   }
   public String getAccessLevel()
   {
      return _accessLevel;
   }

   /**
    * The type of collection (if it is one)
    * @param multiplicity
    */
   public void setMetaType(String metaType)
   {
      _metaType = metaType;
   }
   public String getMetaType()
   {
      return _metaType;
   }

   public void setStatic(Boolean isStatic)
   {
      _isStatic = isStatic;
   }
   public boolean isStatic()
   {
      return _isStatic;
   }

   public void setFinal(Boolean isFinal)
   {
      _isFinal = isFinal;
   }
   public boolean isFinal()
   {
      return _isFinal;
   }

   public void setConst(Boolean isConst)
   {
      _isConst = isConst;
   }
   public boolean isConst()
   {
      return _isConst;
   }
}
